package net.vkits.common.config;

import net.vkits.common.sms.AlidayuSmsService;
import net.vkits.common.sms.SmsService;
import net.vkits.common.sms.TestSmsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * Created by ethan-liu on 16/6/2.
 */
@Configuration
public class SmsConfig {

    @Bean
    @Profile("demo")
    public SmsService alidayuService() {
        return AlidayuSmsService.getInstance();
    }

    @Bean
    @Profile("dev")
    public SmsService testService() {
        return new TestSmsService();
    }
}
